let vm = new Vue({
    el: '.main-content',
    data: {
        qualification: {},
        id: '',

    },
    methods: {
        doUpdate:function (check) {
            this.qualification.check=check;
            this.qualification.address=null;
            axios({
                url:'mapper/qualification/doUpdate',
                method:'put',
                data:this.qualification
            }).then(response=>{
                // layer.msg(response.data.success);
                //更新成功后，关闭当前子窗口   父窗口中显示更新成功，刷新页面
                //不成功提示
                if(response.data.success){
                    parent.layer.success=response.data.success;
                    let index = parent.layer.getFrameIndex(window.name);//根据当前窗体名字获取其索引值
                    console.log(index);
                    parent.layer.close(index);//根据索引值关闭子窗口
                }else {
                    layer.msg(response.data.msg);
                }
            }).catch(error=>{
                layer.msg(error.message);
            })
        },
        selectOne:function () {
            axios({
                url:`mapper/qualification/selectOne/${this.id}`
            }).then(response=>{
                this.qualification=response.data.obj;
            })
        }
    },
    created:function () {
        //当前子窗体初始化  需要从父窗体的layer对象中获取绑定的参数信息
        this.id =  parent.layer.obj.id;
        this.selectOne();
    }

});